package com.zmm.common.enums;

/**
 * @author 900045
 * @description:
 * @name CategoryEnum
 * @date By 2021-07-05 15:46:06
 */
public enum CategoryEnum {

	FRONT_CATE( 1, "前台类目"),
	BACK_STAGE_CATE( 2, "后台类目");

	private Integer code;
	private String name;

	private CategoryEnum(Integer code, String name) {
		this.code = code;
		this.name = name;
	}

	public static boolean  isInCode(Integer code){
		if (code == null) {return false;}
		CategoryEnum[] values = CategoryEnum.values();
		for (CategoryEnum categoryEnum : values) {
			if (categoryEnum.getCode().equals(code)){return true;}
		}
		return false;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
